const _mm = require("util/mm.js");

const _question = {
    getQuestion: function(userInfo, resolve, reject){
		_mm.request({
			url: _mm.getServerUrl("/question/getQuestion.do"),
			data: userInfo,
			method: "post",
			success: resolve,
			error: reject
		});
	},
	checkAnswer: function(selection, resolve, reject){
		_mm.request({
			url: _mm.getServerUrl("/question/checkAnswer.do"),
			data: selection,
			method: "post",
			success: resolve,
			error: reject
		});
	}
};

module.exports = _question;